package com.dong.cloud.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author DJ
 * @description hystrix fallback 检测的时间默认是1s
 * @date 2022/1/15 11:00 下午
 **/
@Component
@FeignClient(value = "cloud-provider-hystrix-payment8001", fallback = PaymentFallbackServiceImpl.class)
public interface PaymentFeign {


    @GetMapping("/payment/hystrix/ok/{id}")
    String paymentInfoOK(@PathVariable("id") Integer id);

    @GetMapping("/payment/hystrix/timeout/{id}")
    String paymentInfoTimeout(@PathVariable("id") Integer id);

}
